<template>
    <Tabs type="card" @on-click="changeTab">
        <TabPane label="客户类型">
            <content ref="content" type="content" :currentTab="currentTab"/>
        </TabPane>
        <TabPane label="业务项目">
            <content ref="accounts" type="accounts" :currentTab="currentTab"/>
        </TabPane>
    </Tabs>
</template>

<script>
    import content from './content.vue'
    export default {
        name: 'basicsetup',
        components:{content},
        data () {
            return {
                currentTab:'content'
            }
        },
        mounted() {
            this.$refs[this.currentTab].getData(this.currentTab)
            // this.getData(this.type)           
        },
        methods:{
            changeTab(e){
                this.currentTab=e==1?'accounts':'content'
                this.$refs[this.currentTab].getData(this.currentTab)
            }
        }
    }
</script>